Polymorphic type inference for scripting languages with object extensions
نویسندگان
چکیده
منابع مشابه
Type Inference for Scripting Languages
JavaScript is a powerful imperative object based language made popular by its use in web pages. It supports flexible program development by allowing dynamic addition of members to objects. Code is dynamically typed: a runtime access to a non-existing member causes an error. In this paper we first develop a formalism of JavaScript, JS0, and a static type system that will detect such type errors....
متن کاملType Inference for Scripting languages with Implicit Extension
This paper presents a constraint-based type inference algorithm fora subset of the JavaScript language. The goal is to prevent accessingundefined members of objects. We define a type system that allowsexplicit extension of objects through add operation and implicitextension through method calls. We prove that a program is typableif and only if we can infer its types. We also...
متن کاملObject-Oriented Type Inference for Telescoping Languages
The telescoping-languages approach achieves high performance from applications encoded as high-level scripts. The core idea is to pre-compile underlying libraries to generate multiple variants optimized for use in different possible contexts including different argument types. We have previously developed a type inference algorithm that enables type-based specialization. The algorithm infers ty...
متن کاملIntegrating Object-Oriented Scripting Languages with HyTime
HyTime provides a comprehensive set of primitives for composing hypermedia documents, but does not provide facilities for representing interaction or dynamic behavior, areas which are required in commercial multimedia authoring environments. In previous work we have developed and implemented a prototype HyTime engine called HyOctane in which HyTime interactive multimedia documents can be stored...
متن کاملType inference for polymorphic methods in Java-like languages
In mainstream class-based object-oriented languages with nominal types, like C++, Java and C#, typechecking algorithms require methods to be annotated with their parameter types, which are either fixed or constrained by a (nominal) bound. On the contrary, languages like ML, CaML and Haskell use powerful type inference algorithms capable of calculating the type for a function in which parameter ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: ACM SIGPLAN Notices
سال: 2012
ISSN: 0362-1340,1558-1160
DOI: 10.1145/2168696.2047855